<?php
declare (strict_types = 1);

namespace app\api\controller\store;

use app\api\controller\Base;
use app\common\service\store\GoodsService;
use think\Request;

class Exchange extends Base
{

    public function getExchangeGoodsList()
    {
        $data = GoodsService::getExchangeGoodsList();
        return $this->res($data);
    }

    public function getExchangeGoodsDetails()
    {
        $id = $this->request->get('id');
        if (empty($id)){
            $data = ['code' =>400,'message' => '参数错误'];
            return $this->res($data);
        }
        $data = GoodsService::getExchangeGoodsDetails($id);
        return $this->res($data);
    }
}
